#ifndef PASSWD_H
#define PASSWD_H
#include<mycpplearn.h>
#include"logger.h"
#include "./uthash-master/src/uthash.h" // 确保你已经包含了 uthash 库


//用户会话结构体
struct user_session {
    int fd;
    char *username;
    int pre_path;
    UT_hash_handle hh;
};
//用户会话哈希表
void add_session(int fd, const char *username, int pre_path);
int change_session_prepath(int fd, int pre_path);
void delete_session(int fd);
struct user_session *find_session(int fd);
void get_a_session(int fd,int pre_path,char *username);
void cleanup_connection(int sockfd);

#endif